<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>Login</title>
</head>

<body>
    <strong><?php
            session_start();
            if (isset($_SESSION['isLogged']) && $_SESSION['isLogged']) {
                echo  "你已经登录了!";
            } else {
                echo "请登录!";
            }
            ?></strong><br>
    <form method="post" action="check.php?action=login">
        username<input type="text" name="username" value="<?php echo isset($_COOKIE['username']) ? $_COOKIE['username'] : "" ?>"><br>
        password<input type="password" name="password" value="<?php echo isset($_COOKIE['password']) ? $_COOKIE['password'] : "" ?>"><br>
        <input type="checkbox" name="check">在本机上保留登录信息<br>
        <input type="submit">
    </form>
    <a href="check.php?action=logout">退出登录</a>
    <a href="check.php?action=clear">清除登录信息</a>
    <a href="show.php">查看留言板</a>
</body>